package main

import (
	"gitee.com/binny_w/gin_starter/core"
	_ "gitee.com/binny_w/gin_starter/model"
	"gitee.com/binny_w/go-util"
	"github.com/gin-contrib/pprof"
	"github.com/gin-gonic/gin"
	_ "go.uber.org/automaxprocs"
)

func main() {
	if gin.Mode() == gin.DebugMode {
		pprof.Register(core.Engine.E)
	}
	util.HttpSrvRun(core.Config.GetString("gin.addr"), core.Engine.E, func() {
		core.MysqlClient.CloseDB()
		core.Logger.Close()
	})
}
